<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Cache-Control" content="no-siteapp" />

    <title>插件使用之宏脚本记录</title>
    <meta name="description" content="xmake 提供了一些内置的比较实用的插件，其中宏脚本插件是最具有代表性和实用性的，也是xmake比较推荐的一款插件，那它有哪些使用功能呢？">

    
    <meta name="keywords" content="xmake,插件,宏脚本,tboox" /> 

    <!-- qq oauth -->
    <meta property="qc:admins" content="5211601217706727767255" />

    <!--icon -->
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" sizes="192x192" href="/static/img/nice-highres.png" />
	<link rel="apple-touch-icon-precomposed" href="/static/img/apple-touch-icon-57x57-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/apple-touch-icon-72x72-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/apple-touch-icon-114x114-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/apple-touch-icon-144x144-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="180x180" href="/static/img/retinahd_icon.png" />
	<meta name="msapplication-TileImage" content="/static/img/retinahd_icon.png" />
	
    <link rel="stylesheet" href=" /css/fontawesome/css/font-awesome.min.css ">
    <link rel="stylesheet" href=" /css/main.css ">
    <link rel="canonical" href="https://tboox.org/cn/2016/06/09/plugin-macro/">
    <link rel="alternate" type="application/rss+xml" title="TBOOX Open Source Project" href="https://tboox.org/feed.xml ">
    <link rel="alternate" hreflang="en" href="https://tboox.org/" />
    <link rel="alternate" hreflang="zh-Hans" href="https://tboox.org/cn/" />

    <!-- css -->
    <link href="/css/reward.css" rel="stylesheet" type="text/css"> 




    <script type="text/javascript">
    function isPC(){    
        var userAgentInfo = navigator.userAgent;  
        var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");    
        var flag = true;    
        for (var v = 0; v < Agents.length; v++) {    
            if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; }    
        }    
        return flag;    
    }
    </script>

<!-- baidu ads -->



    <!-- baidu ads -->

</head>


  <body>

    <header id="top">
    <div class="wrapper">
        <a href="/cn" class="brand">TBOOX</a>
        <button id="headerMenu" class="menu"><i class="fa fa-bars"></i></button>
        <nav id="headerNav">
            <ul>
                <li>
                    
                    <a href="/?lang=0">
                    
                        <i class="fa fa-home"></i>English
                    </a>
                </li>

                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/project/">
                            
                        
                            <i class="fa fa-bookmark"></i>项目
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/archive/">
                            
                        
                            <i class="fa fa-archive"></i>归档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/category/">
                            
                        
                            <i class="fa fa-th-list"></i>分类
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/tag/">
                            
                        
                            <i class="fa fa-tags"></i>标记
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/docs/">
                            
                        
                            <i class="fa fa-book"></i>文档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="https://xmake.io/#/zh-cn/about/contact" target="_blank" >
                            
                        
                            <i class="fa fa-forumbee"></i>社区
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/donation/">
                            
                        
                            <i class="fa fa-heart"></i>捐助
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/about/">
                            
                        
                            <i class="fa fa-user"></i>关于
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            </ul>
        </nav>
    </div>
</header>



        <div class="page clearfix" post>
    <div class="left">
        <h1>插件使用之宏脚本记录</h1>
        <div class="label">

            <div class="label-card">
                <i class="fa fa-calendar"></i>2016-06-09
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
            


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#xmake" title="Category: xmake" rel="category">xmake</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


            </div>

            <div class="label-card">
            
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <!--a href="/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a-->
        <a href="/cn/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a>&nbsp;
    
        <!--a href="/tag/#%E6%8F%92%E4%BB%B6" title="Tag: 插件" rel="tag">插件</a-->
        <a href="/cn/tag/#插件" title="Tag: 插件" rel="tag">插件</a>&nbsp;
    
        <!--a href="/tag/#%E5%AE%8F%E8%84%9A%E6%9C%AC" title="Tag: 宏脚本" rel="tag">宏脚本</a-->
        <a href="/cn/tag/#宏脚本" title="Tag: 宏脚本" rel="tag">宏脚本</a>
    
  

</span>

            </div>

        </div>
        <hr>
        <article itemscope itemtype="http://schema.org/BlogPosting">
        <p>xmake 提供了一些内置的比较实用的插件，其中宏脚本插件是最具有代表性和实用性的，也是xmake比较推荐的一款插件，那它有哪些使用功能呢？</p>

<p>我们先来看下：<code class="highlighter-rouge">xmake macro --help</code></p>

<div class="highlighter-rouge"><pre class="highlight"><code>    Usage: xmake macro|m [options] [name] [arguments]

    Run the given macro.

    Options: 
            --backtrace                        Print backtrace information for debugging.
            --version                          Print the version number and exit.
        -h, --help                             Print this help message and exit.
                                               
        -F FILE, --file=FILE                   Read a given xmake.lua file.
        -P PROJECT, --project=PROJECT          Change to the given project directory.
                                               Search priority:
                                                   1. The Given Command Argument
                                                   2. The Envirnoment Variable: XMAKE_PROJECT_DIR
                                                   3. The Current Directory
                                               
        -v, --verbose                          Print lots of verbose information.
        -b, --begin                            Start to record macro.
                                               .e.g
                                               Record macro with name: test
                                                   xmake macro --begin
                                                   xmake config --plat=macosx
                                                   xmake clean
                                                   xmake -r
                                                   xmake package
                                                   xmake macro --end test
        -e, --end                              Stop to record macro.
                                               
            --show                             Show the content of the given macro.
        -l, --list                             List all macros.
        -d, --delete                           Delete the given macro.
        -c, --clear                            Clear the all macros.
                                               
            --import=IMPORT                    Import the given macro file or directory.
                                               .e.g
                                                   xmake macro --import=/xxx/macro.lua test
                                                   xmake macro --import=/xxx/macrodir
            --export=EXPORT                    Export the given macro to file or directory.
                                               .e.g
                                                   xmake macro --export=/xxx/macro.lua test
                                                   xmake macro --export=/xxx/macrodir
                                               
        name                                   Set the macro name. (default: .)
                                               .e.g
                                                  Run the given macro:     xmake macro test
                                                  Run the anonymous macro: xmake macro .
        arguments ...                          Set the macro arguments.
</code></pre>
</div>

<p>看帮助菜单描述，它提供了一些功能：</p>

<ol>
  <li>手动记录和回放多条执行过的xmake命令</li>
  <li>支持快速的匿名宏创建和回放</li>
  <li>支持命名宏的长久记录和重用</li>
  <li>支持宏脚本的批量导入和导出</li>
  <li>支持宏脚本的删除、显示等管理功能</li>
  <li>支持自定义高级宏脚本，以及参数配置</li>
</ol>

<p>看功能还是蛮多的，那这个宏脚本主要用于哪些场景呢，比如：</p>

<p>我们需要编译打包各个平台的所有架构的库，如果按照每次：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>    xmake f -p android --ndk<span class="o">=</span>/xxx/ndk -a armv7-a
    xmake p
    xmake f -p mingw --sdk<span class="o">=</span>/mingwsdk
    xmake p
    xmake f -p linux --sdk<span class="o">=</span>/toolsdk --toolchains<span class="o">=</span>/xxxx/bin
    xmake p
    xmake f -p iphoneos -a armv7
    xmake p
    xmake f -p iphoneos -a arm64
    xmake p
    xmake f -p iphoneos -a armv7s
    xmake p
    xmake f -p iphoneos -a i386
    xmake p
    xmake f -p iphoneos -a x86_64
    xmake p
</code></pre>
</div>

<p>那还是相当累人的，而且这些命令有可能需要重复执行，每次都这么敲一遍多累啊，如果像交叉编译这种，配置参数更多更复杂的情况，那么会更累</p>

<p>这个时候就需要宏脚本出场了，而且这些宏记录下来后，你可以导出它们，提供给其他人使用，而不需要每次叫他们如何去配置，如何去编译打包了</p>

<p>闲话少说，我们先来看下如何记录一个简单宏脚本。。</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>    <span class="c"># 开始记录宏</span>
    xmake macro --begin

    <span class="c"># 执行一些xmake命令</span>
    xmake f -p android --ndk<span class="o">=</span>/xxx/ndk -a armv7-a
    xmake p
    xmake f -p mingw --sdk<span class="o">=</span>/mingwsdk
    xmake p
    xmake f -p linux --sdk<span class="o">=</span>/toolsdk --toolchains<span class="o">=</span>/xxxx/bin
    xmake p
    xmake f -p iphoneos -a armv7
    xmake p
    xmake f -p iphoneos -a arm64
    xmake p
    xmake f -p iphoneos -a armv7s
    xmake p
    xmake f -p iphoneos -a i386
    xmake p
    xmake f -p iphoneos -a x86_64
    xmake p

    <span class="c"># 结束宏记录，这里不设置宏名字，所以记录的是一个匿名宏</span>
    xmake macro --end 
</code></pre>
</div>

<p>好了，接下来我们就开始回放执行这个宏了。。</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>    <span class="c"># 之前最近记录的一次匿名宏</span>
    xmake macro .
</code></pre>
</div>

<p>匿名宏的好处就是快速记录，快速回放，如果需要长久保存，就需要给宏去个名字，也很简单：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>    <span class="c"># 结束记录，并且命名为test宏</span>
    xmake macro --end <span class="nb">test</span>

    <span class="c"># 回放这个test宏</span>
    xmake macro <span class="nb">test</span>
</code></pre>
</div>

<p>宏的管理：删除、导入、导出这些比较简单，可以敲：<code class="highlighter-rouge">xmake macro --help</code> 自行看下</p>

<p>我们来看下宏脚本记录下来的内容：<code class="highlighter-rouge">xmake macro --show test</code></p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code>    <span class="k">function</span> <span class="nf">main</span><span class="p">()</span>
        
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake f -p android --ndk=/xxx/ndk -a armv7-a"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake p"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake f -p mingw --sdk=/mingwsdk"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake p"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake f -p linux --sdk=/toolsdk --toolchains=/xxxx/bin"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake p"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake f -p iphoneos -a armv7"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake p"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake f -p iphoneos -a arm64"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake p"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake f -p iphoneos -a armv7s"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake p"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake f -p iphoneos -a i386"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake p"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake f -p iphoneos -a x86_64"</span><span class="p">)</span>
        <span class="n">os</span><span class="p">.</span><span class="n">exec</span><span class="p">(</span><span class="s2">"xmake p"</span><span class="p">)</span>  
    <span class="k">end</span>
</code></pre>
</div>

<p>其实就是个lua的脚本，里面你可以使用一切插件开发中使用的类库和内建api，你可以通过import导入他们来使用，并编写一些高级的宏脚本。。</p>

<p>更加高级的宏脚本写法可以参考：<a href="/cn/2016/06/09/plugin-macro-package/">插件使用之批量打包</a></p>

        </article>
        <hr>

        <!-- baidu ads -->
        

        <!-- reward -->
        <div style="text-align: center;">
            <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
              <span>赏</span>
            </button>
            <div id="QR" style="display: none;">
                <div id="wechat" style="display: inline-block">
                  <img id="wechat_qr" src="/static/img/weixin.png" alt="WeChat Pay"/>
                  <p>微信打赏</p>
                </div>
                <div id="alipay" style="display: inline-block">
                  <img id="alipay_qr" src="/static/img/alipay.png" alt="Alipay"/>
                  <p>支付宝打赏</p>
                </div>
            </div>
        </div>

        
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
        

        
        
            
        
            
            
            
                
                    
                        
                        <h2 id="similar_posts">相关文章</h2>
                        <ul>
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/12/17/xmake-update-v2.6.2/">xmake v2.6.2 发布，新增 Linux 内核驱动模块构建支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/12/03/xmake-update-v2.6.1/">xmake v2.6.1 发布，使用 Lua5.4 运行时，Rust 和 C++ 混合编译支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/10/30/xmake-update-v2.5.9/">xmake v2.5.9 发布，改进 C++20 模块，并支持 Nim, Keil MDK 和 Unity Build
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/10/08/xmake-update-v2.5.8/">xmake v2.5.8 发布，新增 Pascal/Swig 程序和 Lua53 运行时支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/cn/2021/08/29/xmake-update-v2.5.7/">xmake v2.5.7 发布，包依赖锁定和 Vala/Metal 语言编译支持
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
            
            
        
        
            </ul>
        

        <div class="post-recent">
    <div class="pre">

        

        

        
        
        <p><strong>上一篇</strong> <a href="/cn/2016/06/09/plugin-macro-package/">插件使用之批量打包</a></p>
        
    </div>

    <div class="nex">

        

        

        
        
        <p><strong>下一篇</strong> <a href="/cn/2016/06/09/update-v2.0.1/">xmake v2.0.1 更新!</a></p>
        
    </div>
</div>


        <h2 id="comments">评论</h2>
        






<div id="gitalk-container"></div>
<link rel="stylesheet" href="/css/gitalk.css">
<script src="/js/gitalk.min.js"></script>

<script>
const gitalk = new Gitalk({
  clientID: '73946dc1d9e2276ad0da',
  clientSecret: '12a3cb94361ba3ebc6ecb68cf80d592bfaa8106d',
  repo: 'tboox.github.io',
  owner: 'waruqi',
  admin: ['waruqi'],
  id: location.pathname,       
  language: 'zh-CN',
  distractionFreeMode: false  
})

gitalk.render('gitalk-container')
</script>





    </div>
    <button class="anchor"><i class="fa fa-anchor"></i></button>
    <div class="right">
        <div class="wrap">

            <!-- codefund ads -->
            

            <!-- Content -->
            <div class="side content">
                <div>
                    内容
                </div>
                <ul id="content-side" class="content-ul">
                    <li><a href="#english">English</a></li>
                    <li><a href="#similar_posts">相关文章</a></li>
                    <li><a href="#comments">评论</a></li>
                </ul>
            </div>


            <!-- baidu ads -->
            
            
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    链接
                </div>
                <ul class="content-ul">
                  <li><a href="http://github.com/waruqi/tbox">tbox</a></li>
                  <li><a href="http://www.xmake.io">xmake</a></li>
                  <li><a href="https://github.com/waruqi">github</a></li>
                </ul>
            </div> 

            <!-- xmake courses -->
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    xmake 入门课程
                </div>
                <a href="https://xmake.io/#/zh-cn/about/course" target="_blank">
                <img src="/static/img/xmake-course.png" alt="course" width="256" height="193">
                </a>
            </div>

            <!-- qqgroup -->
            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    技术交流群（QQ）
                </div>
                <img src="/static/img/qqgroup.png" alt="qqgroup" width="256" height="284">
            </div> 

            <!-- google ads -->
            

            <!-- baidu ads -->
            

        </div>
    </div>

    <!-- baidu ads -->
    
</div>
<script>
/**
 * target _blank
 */
(function() {
    var aTags = document.querySelectorAll('article a:not([id])')
    for (var i = 0; i < aTags.length; i++) {
        aTags[i].setAttribute('target', '_blank')
    }
}());
</script>
<script src="/js/pageContent.js " charset="utf-8"></script>



    <footer class="site-footer">
    <div class="wrapper">
        <p class="description">
             Copyright (c) 2016-2020 tboox.org 
        </p>
        <p class="contact">
            
            <a href="https://github.com/waruqi" title="GitHub"><i class="fa fa-github" aria-hidden="true"></i></a> 
             
            
            <a href="mailto:waruqi@gmail.com" title="email"><i class="fa fa-envelope-o" aria-hidden="true"></i></a> 
            
            
            <a href="https://twitter.com/waruqi" title="Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> 
            
            <a href="/feed.xml" title="feed"><i class="fa fa-feed" aria-hidden="true"></i></a> 
        </p>
        <p class="power">
            <span>
                Site powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/Gaohaoyang">HyG</a> & <a href="https://pages.github.com/">Github Pages</a>.
            </span>
        </p>
    </div>
</footer>

    <div class="back-to-top">
    <a href="#top" class="scroll">
        <i class="fa fa-arrow-up" aria-hidden="true"></i>
    </a>
</div>

    <script src=" /js/main.js " charset="utf-8"></script>
    <script src=" /js/scroll.min.js " charset="utf-8"></script>
  </body>

</html>
